home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16567 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.1 KB  |  62 lines

  1. Newsgroups: comp.lang.c++
  2. Path: netcom.com!craiga
  3. From: craiga@netcom.com (Craig Arnush)
  4. Subject: Re: Borland 5.0 16-bit Linker Problems
  5. Message-ID: <craigaDpo45w.29I@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. References: <4kbnrg$ofr@Grouper.Exis.Net> <316B8C76.381A@craft.camp.clarkson.edu> <316C06E9.1FF4@crc.ricoh.com>
  8. Date: Wed, 10 Apr 1996 22:37:08 GMT
  9. Sender: craiga@netcom20.netcom.com
  10.  
  11. Jamey Graham <jamey@crc.ricoh.com> writes:
  12. >i asked him what the conagent was and he had no idea and asked around the
  13. >shop and nobody could tell him. there is a brief explanation of this process
  14. >in the readme.txt file in \bc5, search for "out of memory".  anyway, i do not
  15. >have the problem anymore but would really like to know why and how this
  16. >resolved it.
  17.  
  18. In order to keep things a little more modular and keep from having 
  19. duplicate code lying around on your hard disk, the IDE just simply runs 
  20. the TLINK.EXE command-line program when it comes time to link a 16-bit 
  21. application (TLINK32.EXE is similarly used for 32-bit applications).  In 
  22. Windows 95, whenever a 16-bit command-line (also called a DOS 
  23. application) is called from a 32-bit console or windowed application that 
  24. wants to trap the output, the call is done through the CONAGENT.EXE 
  25. program that is supplied with Windows 95.
  26.  
  27. I want to reiterate that point: CONAGENT.EXE is supplied by Microsoft 
  28. with the Windows 95 installation.  What happens then is that since there 
  29. aren't any memory options specified for CONAGENT, it just uses the 
  30. defaults set up by the operating system.  Unfortunately, this doesn't 
  31. give the application a whole lot of memory (as I'm sure you noticed when 
  32. you saw the values before you changed them to "Auto").  TLINK needs quite 
  33. a bit of memory, and if it's limited, it will run out of room quite 
  34. quickly and complain bitterly.  By changing CONAGENT's memory settings to 
  35. "Auto", you allow TLINK (and any other 16-bit EXE shelled from another 
  36. program that captures the output) to request and receive all the memory 
  37. it may need...within the regular 16-bit constraints, of course.
  38.  
  39. >so far, i cannot get my 16bit code to link.  i am getting errors like
  40. >"automatic data segment exceeds 64k" and that some of my library objects
  41. >have not been found.
  42.  
  43. Hmmm.  It sounds like something might have changed in the size of some 
  44. things you're using between the two compiler versions.  Have you tried 
  45. making a MAP file and finding out just how much larger than 64K your data 
  46. segment is getting?  Can you compare this with an older MAP file to try 
  47. and find out what's taking up all the room?  Were you using exceptions 
  48. before?  Are you using them now?  How about RTTI?
  49.  
  50. Also, do you need to stick with 16 bits?  Moving up to 32 bits would 
  51. certainly help your situation, if it's a viable option (which it isn't 
  52. always).
  53.  
  54. Me
  55. -- 
  56. /-------------------------------------------------------\
  57. | Craig Arnush      | "Why are you arresting me?        |
  58. |                   |  You said I was *legally* drunk!" |
  59. | craiga@netcom.com |         - T. Viking               |
  60. \-------------------------------------------------------/
  61.